package com.hand.demo.infra.repository.impl;

import org.apache.commons.collections.CollectionUtils;
import org.hzero.mybatis.base.impl.BaseRepositoryImpl;
import org.springframework.stereotype.Component;
import com.hand.demo.domain.entity.HhrTaEducation;
import com.hand.demo.domain.repository.HhrTaEducationRepository;
import com.hand.demo.infra.mapper.HhrTaEducationMapper;

import javax.annotation.Resource;
import java.util.List;

/**
 * 标准化教育经历表(HhrTaEducation)资源库
 *
 * @author
 * @since 2025-06-16 12:16:54
 */
@Component
public class HhrTaEducationRepositoryImpl extends BaseRepositoryImpl<HhrTaEducation> implements HhrTaEducationRepository {
    @Resource
    private HhrTaEducationMapper hhrTaEducationMapper;

    @Override
    public List<HhrTaEducation> selectList(HhrTaEducation hhrTaEducation) {
        return hhrTaEducationMapper.selectList(hhrTaEducation);
    }

    @Override
    public HhrTaEducation selectByPrimary(Long id) {
        HhrTaEducation hhrTaEducation = new HhrTaEducation();
        hhrTaEducation.setId(id);
        List<HhrTaEducation> hhrTaEducations = hhrTaEducationMapper.selectList(hhrTaEducation);
        if (hhrTaEducations.size() == 0) {
            return null;
        }
        return hhrTaEducations.get(0);
    }

}

